package com.education.wisdom.service.impl;

import com.education.common.utils.Convert;
import com.education.wisdom.mapper.ResourcesUserMapper;
import com.education.wisdom.pojo.ResourcesUser;
import com.education.wisdom.service.IResourcesUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * 用户下载中间 服务层实现
 * 
 * @author ruoyi
 * @date 2019-01-24
 */
@Service
public class ResourcesUserServiceImpl implements IResourcesUserService
{
	@Autowired
	private ResourcesUserMapper resourcesUserMapper;

	/**
     * 查询用户下载中间信息
     * 
     * @param id 用户下载中间ID
     * @return 用户下载中间信息
     */
    @Override
	public ResourcesUser selectResourcesUserById(Integer id)
	{
	    return resourcesUserMapper.selectResourcesUserById(id);
	}
	
	/**
     * 查询用户下载中间列表
     * 
     * @param resourcesUser 用户下载中间信息
     * @return 用户下载中间集合
     */
	@Override
	public List<ResourcesUser> selectResourcesUserList(ResourcesUser resourcesUser)
	{
	    return resourcesUserMapper.selectResourcesUserList(resourcesUser);
	}
	
    /**
     * 新增用户下载中间
     * 
     * @param resourcesUser 用户下载中间信息
     * @return 结果
     */
	@Override
	public int insertResourcesUser(ResourcesUser resourcesUser)
	{
	    return resourcesUserMapper.insertResourcesUser(resourcesUser);
	}
	
	/**
     * 修改用户下载中间
     * 
     * @param resourcesUser 用户下载中间信息
     * @return 结果
     */
	@Override
	public int updateResourcesUser(ResourcesUser resourcesUser)
	{
	    return resourcesUserMapper.updateResourcesUser(resourcesUser);
	}

	/**
     * 删除用户下载中间对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteResourcesUserByIds(String ids)
	{
		return resourcesUserMapper.deleteResourcesUserByIds(Convert.toStrArray(ids));
	}

	@Override
	public List<ResourcesUser> selectIsDown(Map<String, Object> map) {
		return resourcesUserMapper.selectIsDown(map);
	}
	
}
